using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using DTO;
using System.Data;

namespace HeThongDAO
{
    public class TheLoaiSachDAO
    {
        public static void ThemTheLoaiSach(TheLoaiSachDTO tls)
        {
            string sql = "insert into THE_LOAI_SACH(MaSach,MaTheLoai) values(@masach,@matheloai)";
            sql = sql.Replace("@masach", tls.IMaSach.ToString());
            sql = sql.Replace("@matheloai",tls.IMaTheLoai.ToString());
            Config.AccessHelper.ExecuteNonQuery(sql);
        }
        public static void XoaSach(TheLoaiSachDTO tls)
        {
            string sql = "DELETE FROM THE_LOAI_SACH WHERE MaSach=@masach";
            sql = sql.Replace("@masach", tls.IMaSach.ToString());
            Config.AccessHelper.ExecuteNonQuery(sql);
        }
    }
}
